FROM continuumio/anaconda3

RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ && \
    pip config set global.extra-index-url https://pypi.org/simple/

WORKDIR /app

COPY environment.yml .

RUN echo "source activate opencv" > ~/.bashrc
ENV PATH /opt/conda/envs/opencv/bin:$PATH

COPY . .

RUN pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

CMD python main.py